package com.groupnections.shared.entities;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @Entity
 */
public class Groups implements Serializable {

	private static final long serialVersionUID = 1L;

	public static final String GROUP_NONE = "None";

	private Long groupID;

	private String groupName;

	private String groups;

	public Long getGroupID() {
		return groupID;
	}

	public void setGroupID(Long groupID) {
		this.groupID = groupID;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getGroups() {
		return groups;
	}

	public void setGroups(String groups) {
		this.groups = groups;
	}

	public static String getStaticTags(String description, String tagsList) {

		String[] tagsArray = tagsList.split(",");

		List<String> descriptionTagsList = new ArrayList<String>();

		String descriptionTags = "";

		for (String tag : tagsArray) {

			if (description.toLowerCase().contains(tag.trim().toLowerCase())) {

				descriptionTagsList.add(tag);

				descriptionTags += tag + ",";
			}
		}

		return descriptionTags;
	}
}
